package foundation.the_dance_of_Sine;

import java.util.Scanner;

/**
 * 不妨设
 * 　　An=sin(1–sin(2+sin(3–sin(4+...sin(n))...)
 * 　　Sn=(...(A1+n)A2+n-1)A3+...+2)An+1
 * 　　FJ想让奶牛们计算Sn的值，请你帮助FJ打印出Sn的完整表达式，以方便奶牛们做题。
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(getSn(n).toString());
    }

    public static StringBuilder getSn(int n) {
        StringBuilder str = new StringBuilder();
        int tmp1 = 1;
        int tmp2 = n;
        while (tmp1 <= n) {
            if (tmp1 == 1) {
                str.append(getAn(tmp1) + "+" + tmp2);
            } else {
                str.insert(0, "(");
                str.append(")" + getAn(tmp1) + "+" + tmp2);
            }
            tmp1 ++;
            tmp2 --;
        }
        return str;
    }

    public static StringBuilder getAn(int n) {
        StringBuilder str = new StringBuilder();
        int tmp = n;
        while (tmp >= 0) {
            if (tmp == n) {
                str.append(n);
            } else if (tmp > 0){
                if (tmp % 2 == 0) {
                    str.insert(0, tmp + "+sin(");
                } else {
                    str.insert(0, tmp + "-sin(");
                }
                str.append(")");
            } else {
                str.insert(0, "sin(");
                str.append(")");
            }
            tmp --;
        }
        return str;
    }
}
